package com.example.service;

import com.example.domain.ExcelData;
import com.example.domain.Staff;
import com.example.domain.Training;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLException;
import java.util.List;

/**
 * @author luo
 */

public interface TrainingService {
    /**
     * 查看培训信息
     * @return
     */
    public List<Training> selectTrain();

    /**
     * 根据id查询培训信息
     * @param id
     * @return
     */
    public Training selectTrainById(Integer id);

    /**
     * 模糊查询
     * @param training
     * @return
     */
    public List<Training> selectTrainByName(Training training);

    /**
     * 添加培训信息
     * @param training
     * @return
     */
    public int addTrain(Training training);

    /**
     * 更新培训信息
     *
     * @param training
     * @return
     */
    public int updateTrain(Training training);

    /**
     * 根据id删除培训信息
     * @param id
     * @return
     */
    @Delete("delete from training where id=#{id};")
    public int deleteTrain(Integer id);
    /**
     * 分页查询
     * @param page
     * @param size
     * @return
     */
    public PageInfo<Training> findPage(int page, int size);
    /**
     * 打印
     * @return
     */
    public ExcelData getOutputExcelProjectData();
}
